package com.haibara.aiojcodesandbox.core;


import com.haibara.aiojcodesandbox.model.enums.QuestionSubmitLanguageEnum;

public class CodeSandboxFactory {
    public static CodeSandboxTemplate getInstance(QuestionSubmitLanguageEnum language) {
        CodeSandboxTemplate codeSandbox;
        switch (language){
            case JAVA : codeSandbox = new JavaNativeCodeSandbox();break;
            case CPP : codeSandbox = new CppNativeCodeSandbox();break;
            default : throw new RuntimeException("暂不支持");
        }
        return codeSandbox;
    }
}
